package com.gitee.mazhenggg.demo.rpc.config;

import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.reactive.function.client.WebClient;

/**
 * @author mazhenggg
 */
@Slf4j
@Configuration
public class ReFeignAutoConfiguration {
    @Bean
    @LoadBalanced
    @ConditionalOnMissingBean
    public WebClient.Builder loadBalancedWebClientBuilder() {
        return WebClient.builder();
    }

}
